package cn.jiyun.controller;

import cn.jiyun.config.UserProperties;
import cn.jiyun.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class Usercontroller {
//    @Autowired
//    private UserProperties userProperties;
//    @GetMapping("/getUser")
//    public Map<String,Object> getUser(){
//        Map<String,Object>map=new HashMap<>();
//map.put("username",userProperties.getUsername());
//map.put("password",userProperties.getPassword());
//map.put("age",userProperties.getAge());
//map.put("hobbys",userProperties.getHobbys());
//
//        return map;    }

@Autowired
    private User user;
@GetMapping("/getUser")
    public  User getUser(){return user;}
}
